home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume12 / musbus5.2 / part01 next >
Encoding:
Internet Message Format  |  1988-03-01  |  47.6 KB

  1. Subject:  v12i072:  MUSBUS 5.2 Upgrade, Part01/03
  2. Newsgroups: comp.sources.unix
  3. Approved: kre@munnari.oz.au
  4.  
  5. Submitted by: kenj@moncsbruce.oz (Ken McDonell)
  6. Posting-number: Volume 12, Issue 72
  7. Archive-name: musbus5.2/Part01
  8.  
  9.     [ nb: this upgrade uses "normal" diff files, in order to
  10.       save space.  It will work, when applied to an unaltered
  11.       musbus from the sources archives (with the exception of
  12.       two files, as noted in the README file included here).
  13.  
  14.       This is intended to be unpacked in a directory "Update",
  15.       a new subdirectory of the root of the musbus tree.  Whether
  16.       you do that, or move the files later, doesn't matter.  ... kre]
  17.  
  18. MUSBUS - Monash University Software for Benchmarking Unix Systems
  19.  
  20. This distribution contains all the files and scripts necessary to upgrade
  21. the MUSBUS suite from version 5.0 (as originally distributed to Usenet
  22. comp.sources.unix as volume 11, issues 29 to 32) to version 5.2.
  23.  
  24. The upgrade kit assumes you have the public domain program ``patch''
  25. for applying ``diff'' patches to files, and all changes may be applied
  26. automatically using the supplied script ``install''.  See the README
  27. for further details.
  28.  
  29. #! /bin/sh
  30. # This is a shell archive, meaning:
  31. # 1. Remove everything above the #! /bin/sh line.
  32. # 2. Save the resulting text in a file.
  33. # 3. Execute the file with /bin/sh (not csh) to create the files:
  34. #    README
  35. #    changes
  36. #    chkpath
  37. #    install
  38. #    update.001
  39. #    update.002
  40. #    update.003
  41. #    update.004
  42. #    update.005
  43. #    update.006
  44. #    update.007
  45. #    update.008
  46. #    update.009
  47. #    update.010
  48. #    update.011
  49. #    update.012
  50. #    update.013
  51. #    update.014
  52. #    update.015
  53. #    update.016
  54. #    update.017
  55. #    update.018
  56. #    update.019
  57. #    update.020
  58. # This archive created: Tue Jan 19 08:35:29 EST 1988
  59. export PATH; PATH=/bin:$PATH
  60. echo 'x - README'
  61. if test -f 'README'
  62. then
  63.     echo 'shar: over-writing existing file README'
  64. fi
  65. sed 's/^X//' > README <<'End-of-File-Grunt'
  66. XMUSBUS - Monash University Software for Benchmarking Unix Systems
  67. X
  68. XMUSBUS Version 5.2 -- Installation Notes
  69. X
  70. XThis directory contains all the files and scripts necessary to upgrade
  71. Xthe Monash University Software for Benchmarking Unix Systems (MUSBUS)
  72. Xsuite from version 5.0 (as originally distributed to Usenet comp.sources.unix
  73. Xas volume 11, issues 29 to 32) to the most recent version 5.2.
  74. X
  75. XThe most common application of MUSBUS is as a performance evaluation
  76. Xtool to predict system throughput in a simulated multi-user test using
  77. Xsite- or application-specific workload scripts to model the profile
  78. Xof user processing activity.
  79. X
  80. XMajor changes between versions 5.0 and 5.2
  81. X
  82. X[*] System V specific fixes applied.
  83. X
  84. X[*] New workload profiles (text processing and system exercising under
  85. X    heavy load), and assistance for automating the creation and integration
  86. X    of tailor-made workload profiles into the multi-user test.
  87. X
  88. X[*] Tighter error checking.
  89. X
  90. X[*] Many minor bug fixes and enhancements to improve portability and
  91. X    robustness.
  92. X
  93. XThe file ``changes'' in this upgrade kit describes *state* changes to
  94. Xfiles that will be made during the upgrade.
  95. X
  96. XThe upgrade kit assumes you have the public domain program ``patch''
  97. Xfor applying ``diff'' patches to files.
  98. X
  99. XTo make the upgrade,
  100. X
  101. X1) cd to the MUSBUS version 5.0 source directory
  102. X
  103. X2) ./mkinstall
  104. X   If you have been running the version 5.0 software, this will do nothing. 
  105. X   If the source is unpacked directly from the original Usenet
  106. X   comp.sources.unix shar files, this will create the necessary directory
  107. X   structure and shuffle some files into the correct places.
  108. X
  109. X3) mkdir Update
  110. X
  111. X4) move or copy all the files from the upgrade kit to the directory Update;
  112. X   ensure they are unpacked from their shar archive format (should be 52
  113. X   files).
  114. X
  115. X5) cd Update
  116. X
  117. X6) chmod u+x install
  118. X   ./install
  119. X   This will make the upgrade, and leave copies of the previous version
  120. X   of any altered file in the directory tree at or below `.' with a
  121. X   filename suffix of ``.orig''
  122. X   There is a chance that patch will complain about some unexpected
  123. X   text in your 5.0 versions -- these cases should all be constrained
  124. X   to problems with the CTL-G (BELL) characters being stripped from the
  125. X   Usenet distributions in the files ``run'' and ``cleanup''; this
  126. X   requires the obvious (but manual) changes involving $bell or ${bell}
  127. X   (in the new versions) -- check also that $bell is assigned to "^G",
  128. X   not "", at the start of each of these files.
  129. X
  130. X7) cd ..
  131. X
  132. X8) Check the Makefile rule for making time.awk is
  133. X    ln BDStime.awk time.awk
  134. X   or
  135. X    ln SysVtime.awk time.awk
  136. X   depending on your flavour of Unix.
  137. X   Also check for local changes to the Makefiles, e.g. CFLAGS=-DSysV for
  138. X   System V based systems.
  139. X
  140. X9) rm time.awk
  141. X
  142. X10) make modes time.awk
  143. X
  144. X11) see ``Intro.nr'' for updated user guide and instructions.
  145. X
  146. XMail problems to musbus@moncsbruce.oz.au
  147. End-of-File-Grunt
  148. if test 2894 -ne `cat 'README' | wc -c`
  149. then
  150.     echo 'shar: transmission error (expected 2894 characters)'
  151. fi
  152. echo 'x - changes'
  153. if test -f 'changes'
  154. then
  155.     echo 'shar: over-writing existing file changes'
  156. fi
  157. sed 's/^X//' > changes <<'End-of-File-Grunt'
  158. X./run - patch
  159. X./time.awk - no RCS archive
  160. X./arith.c - no change
  161. X./mem.c - patch
  162. X./fstime.c - patch
  163. X./syscall.c - no change
  164. X./context1.c - no change
  165. X./pipe.c - patch
  166. X./spawn.c - no change
  167. X./big.c - no change
  168. X./execl.c - no change
  169. X./makework.c - patch
  170. X./util.c - patch
  171. X./getwork.c - patch
  172. X./keyb.c - patch
  173. X./iamalive.c - no change
  174. X./limit.c - no change
  175. X./clock.c - patch
  176. X./precision.c - no change
  177. X./ttychk.c - patch
  178. X./mkperm.c - no change
  179. X./makework.h - no change
  180. X./cctest.c - no change
  181. X./hanoi.c - no change
  182. X./MAKE - new
  183. X./mkdistrib - replacement text
  184. X./mkinstall - patch
  185. X./mkscript - patch
  186. X./mkscript.out - new
  187. X./fixPATH - new
  188. X./qhisto - new
  189. X./Groan - replacement text
  190. X./progress - new
  191. X./BSDtime.awk - no change
  192. X./SysVtime.awk - patch
  193. X./check.sed - patch
  194. X./dc.dat - no change
  195. X./fs.awk - patch
  196. X./mem.awk - patch
  197. X./README - no change
  198. X./Makefile - patch
  199. X./Intro.nr - patch
  200. X./cleanup - patch
  201. X./musbus.1 - no change
  202. X./signature - new
  203. X./Workload/Makefile - replacement text
  204. X./Workload/cat.dat - no change
  205. X./Workload/dummy.c - no change
  206. X./Workload/edit.dat - no change
  207. X./Workload/grep.dat - no change
  208. X./Workload/edscr1.dat - no change
  209. X./Workload/edscr2.dat - no change
  210. X./Workload/DESCRIPTION - new
  211. X./Workload/script.master - replacement text
  212. X./Workload/cleanstderr - new
  213. X./Work_text/Makefile - new
  214. X./Work_text/big.txt - new
  215. X./Work_text/viscr1.dat - new
  216. X./Work_text/viscr2.dat - new
  217. X./Work_text/small.txt - new
  218. X./Work_text/DESCRIPTION - new
  219. X./Work_text/map_pty - new
  220. X./Work_text/termname.c - new
  221. X./Work_text/README - new
  222. X./Work_text/cleanstderr - new
  223. X./Work_text/script.master - new
  224. X./Work_stress/Makefile - new
  225. X./Work_stress/cleanstderr - new
  226. X./Work_stress/script.master - new
  227. X./Work_stress/DESCRIPTION - new
  228. X./Work_stress/README - new
  229. X./Tools/Makefile - new
  230. X./Tools/comptbl.1 - no change
  231. X./Tools/comptbl.2 - no change
  232. X./Tools/comptbl.3 - no change
  233. X./Tools/comptbl.4 - no change
  234. X./Tools/comptbl.5 - no change
  235. X./Tools/tbl.1 - no change
  236. X./Tools/tbl.2 - no change
  237. X./Tools/tbl.3 - no change
  238. X./Tools/tbl.4 - no change
  239. X./Tools/tbl.5 - no change
  240. X./Tools/Adjust - no change
  241. X./Tools/Config - no change
  242. X./Tools/mk1 - no change
  243. X./Tools/mk2 - no change
  244. X./Tools/mkcomp - no change
  245. X./Tools/mktbl - no change
  246. End-of-File-Grunt
  247. if test 2187 -ne `cat 'changes' | wc -c`
  248. then
  249.     echo 'shar: transmission error (expected 2204 characters)'
  250. fi
  251. echo 'x - chkpath'
  252. if test -f 'chkpath'
  253. then
  254.     echo 'shar: over-writing existing file chkpath'
  255. fi
  256. sed 's/^X//' > chkpath <<'End-of-File-Grunt'
  257. X#! /bin/sh
  258. Xfor file
  259. Xdo
  260. X    path=""
  261. X    for dir in `echo $file | sed -e 's,/, ,g' -e 's/^/ /' -e 's/ [^ ]*$//'`
  262. X    do
  263. X    if test "$path" = ""
  264. X    then
  265. X        path=$dir
  266. X    else
  267. X        path=$path/$dir
  268. X    fi
  269. X    test "$path" = "" && continue
  270. X    test -d $path || mkdir $path
  271. X    done
  272. Xdone
  273. End-of-File-Grunt
  274. if test 267 -ne `cat 'chkpath' | wc -c`
  275. then
  276.     echo 'shar: transmission error (expected 267 characters)'
  277. fi
  278. echo 'x - install'
  279. if test -f 'install'
  280. then
  281.     echo 'shar: over-writing existing file install'
  282. fi
  283. sed 's/^X//' > install <<'End-of-File-Grunt'
  284. X#! /bin/sh
  285. X# Update kit for changes to /mnt/kenj/Src/musbus since version Rel5_0
  286. X# Packaged by mkupdate (version 2.4) on Tue Jan 19 08:09:12 EST 1988
  287. Xchmod u+x ./chkpath
  288. Xecho ../run:
  289. Xpatch ../run <update.001
  290. X./chkpath ./run
  291. Xmv ../run.orig ./run.orig
  292. Xecho ../mem.c:
  293. Xpatch ../mem.c <update.002
  294. X./chkpath ./mem.c
  295. Xmv ../mem.c.orig ./mem.c.orig
  296. Xecho ../fstime.c:
  297. Xpatch ../fstime.c <update.003
  298. X./chkpath ./fstime.c
  299. Xmv ../fstime.c.orig ./fstime.c.orig
  300. Xecho ../pipe.c:
  301. Xpatch ../pipe.c <update.004
  302. X./chkpath ./pipe.c
  303. Xmv ../pipe.c.orig ./pipe.c.orig
  304. Xecho ../makework.c:
  305. Xpatch ../makework.c <update.005
  306. X./chkpath ./makework.c
  307. Xmv ../makework.c.orig ./makework.c.orig
  308. Xecho ../util.c:
  309. Xpatch ../util.c <update.006
  310. X./chkpath ./util.c
  311. Xmv ../util.c.orig ./util.c.orig
  312. Xecho ../getwork.c:
  313. Xpatch ../getwork.c <update.007
  314. X./chkpath ./getwork.c
  315. Xmv ../getwork.c.orig ./getwork.c.orig
  316. Xecho ../keyb.c:
  317. Xpatch ../keyb.c <update.008
  318. X./chkpath ./keyb.c
  319. Xmv ../keyb.c.orig ./keyb.c.orig
  320. Xecho ../clock.c:
  321. Xpatch ../clock.c <update.009
  322. X./chkpath ./clock.c
  323. Xmv ../clock.c.orig ./clock.c.orig
  324. Xecho ../ttychk.c:
  325. Xpatch ../ttychk.c <update.010
  326. X./chkpath ./ttychk.c
  327. Xmv ../ttychk.c.orig ./ttychk.c.orig
  328. Xecho ../MAKE:
  329. X./chkpath ../MAKE
  330. Xcp update.011 ../MAKE
  331. Xecho ../mkdistrib:
  332. X./chkpath ./mkdistrib ../mkdistrib
  333. Xcp ../mkdistrib ./mkdistrib.orig
  334. Xchmod u+w ../mkdistrib
  335. Xcp update.012 ../mkdistrib
  336. Xchmod u-w ../mkdistrib
  337. Xecho ../mkinstall:
  338. Xpatch ../mkinstall <update.013
  339. X./chkpath ./mkinstall
  340. Xmv ../mkinstall.orig ./mkinstall.orig
  341. Xecho ../mkscript:
  342. Xpatch ../mkscript <update.014
  343. X./chkpath ./mkscript
  344. Xmv ../mkscript.orig ./mkscript.orig
  345. Xecho ../mkscript.out:
  346. X./chkpath ../mkscript.out
  347. Xcp update.015 ../mkscript.out
  348. Xecho ../fixPATH:
  349. X./chkpath ../fixPATH
  350. Xcp update.016 ../fixPATH
  351. Xecho ../qhisto:
  352. X./chkpath ../qhisto
  353. Xcp update.017 ../qhisto
  354. Xecho ../Groan:
  355. X./chkpath ./Groan ../Groan
  356. Xcp ../Groan ./Groan.orig
  357. Xchmod u+w ../Groan
  358. Xcp update.018 ../Groan
  359. Xchmod u-w ../Groan
  360. Xecho ../progress:
  361. X./chkpath ../progress
  362. Xcp update.019 ../progress
  363. Xecho ../SysVtime.awk:
  364. Xpatch ../SysVtime.awk <update.020
  365. X./chkpath ./SysVtime.awk
  366. Xmv ../SysVtime.awk.orig ./SysVtime.awk.orig
  367. Xecho ../check.sed:
  368. Xpatch ../check.sed <update.021
  369. X./chkpath ./check.sed
  370. Xmv ../check.sed.orig ./check.sed.orig
  371. Xecho ../fs.awk:
  372. Xpatch ../fs.awk <update.022
  373. X./chkpath ./fs.awk
  374. Xmv ../fs.awk.orig ./fs.awk.orig
  375. Xecho ../mem.awk:
  376. Xpatch ../mem.awk <update.023
  377. X./chkpath ./mem.awk
  378. Xmv ../mem.awk.orig ./mem.awk.orig
  379. Xecho ../Makefile:
  380. Xpatch ../Makefile <update.024
  381. X./chkpath ./Makefile
  382. Xmv ../Makefile.orig ./Makefile.orig
  383. Xecho ../Intro.nr:
  384. Xpatch ../Intro.nr <update.025
  385. X./chkpath ./Intro.nr
  386. Xmv ../Intro.nr.orig ./Intro.nr.orig
  387. Xecho ../cleanup:
  388. Xpatch ../cleanup <update.026
  389. X./chkpath ./cleanup
  390. Xmv ../cleanup.orig ./cleanup.orig
  391. Xecho ../signature:
  392. X./chkpath ../signature
  393. Xcp update.027 ../signature
  394. Xecho ../Workload/Makefile:
  395. X./chkpath ./Workload/Makefile ../Workload/Makefile
  396. Xcp ../Workload/Makefile ./Workload/Makefile.orig
  397. Xchmod u+w ../Workload/Makefile
  398. Xcp update.028 ../Workload/Makefile
  399. Xchmod u-w ../Workload/Makefile
  400. Xecho ../Workload/DESCRIPTION:
  401. X./chkpath ../Workload/DESCRIPTION
  402. Xcp update.029 ../Workload/DESCRIPTION
  403. Xecho ../Workload/script.master:
  404. X./chkpath ./Workload/script.master ../Workload/script.master
  405. Xcp ../Workload/script.master ./Workload/script.master.orig
  406. Xchmod u+w ../Workload/script.master
  407. Xcp update.030 ../Workload/script.master
  408. Xchmod u-w ../Workload/script.master
  409. Xecho ../Workload/cleanstderr:
  410. X./chkpath ../Workload/cleanstderr
  411. Xcp update.031 ../Workload/cleanstderr
  412. Xecho ../Work_text/Makefile:
  413. X./chkpath ../Work_text/Makefile
  414. Xcp update.032 ../Work_text/Makefile
  415. Xecho ../Work_text/big.txt:
  416. X./chkpath ../Work_text/big.txt
  417. Xcp update.033 ../Work_text/big.txt
  418. Xecho ../Work_text/viscr1.dat:
  419. X./chkpath ../Work_text/viscr1.dat
  420. Xcp update.034 ../Work_text/viscr1.dat
  421. Xecho ../Work_text/viscr2.dat:
  422. X./chkpath ../Work_text/viscr2.dat
  423. Xcp update.035 ../Work_text/viscr2.dat
  424. Xecho ../Work_text/small.txt:
  425. X./chkpath ../Work_text/small.txt
  426. Xcp update.036 ../Work_text/small.txt
  427. Xecho ../Work_text/DESCRIPTION:
  428. X./chkpath ../Work_text/DESCRIPTION
  429. Xcp update.037 ../Work_text/DESCRIPTION
  430. Xecho ../Work_text/map_pty:
  431. X./chkpath ../Work_text/map_pty
  432. Xcp update.038 ../Work_text/map_pty
  433. Xecho ../Work_text/termname.c:
  434. X./chkpath ../Work_text/termname.c
  435. Xcp update.039 ../Work_text/termname.c
  436. Xecho ../Work_text/README:
  437. X./chkpath ../Work_text/README
  438. Xcp update.040 ../Work_text/README
  439. Xecho ../Work_text/cleanstderr:
  440. X./chkpath ../Work_text/cleanstderr
  441. Xcp update.041 ../Work_text/cleanstderr
  442. Xecho ../Work_text/script.master:
  443. X./chkpath ../Work_text/script.master
  444. Xcp update.042 ../Work_text/script.master
  445. Xecho ../Work_stress/Makefile:
  446. X./chkpath ../Work_stress/Makefile
  447. Xcp update.043 ../Work_stress/Makefile
  448. Xecho ../Work_stress/cleanstderr:
  449. X./chkpath ../Work_stress/cleanstderr
  450. Xcp update.044 ../Work_stress/cleanstderr
  451. Xecho ../Work_stress/script.master:
  452. X./chkpath ../Work_stress/script.master
  453. Xcp update.045 ../Work_stress/script.master
  454. Xecho ../Work_stress/DESCRIPTION:
  455. X./chkpath ../Work_stress/DESCRIPTION
  456. Xcp update.046 ../Work_stress/DESCRIPTION
  457. Xecho ../Work_stress/README:
  458. X./chkpath ../Work_stress/README
  459. Xcp update.047 ../Work_stress/README
  460. Xecho ../Tools/Makefile:
  461. X./chkpath ../Tools/Makefile
  462. Xcp update.048 ../Tools/Makefile
  463. End-of-File-Grunt
  464. if test 5204 -ne `cat 'install' | wc -c`
  465. then
  466.     echo 'shar: transmission error (expected 5204 characters)'
  467. fi
  468. echo 'x - update.001'
  469. if test -f 'update.001'
  470. then
  471.     echo 'shar: over-writing existing file update.001'
  472. fi
  473. sed 's/^X//' > update.001 <<'End-of-File-Grunt'
  474. X2c2
  475. X< version="5.0"
  476. X---
  477. X> version="5.2"
  478. X8c8
  479. X< # $Header: run,v 3.13 87/09/17 06:09:50 kenj Exp $
  480. X---
  481. X> # $Header: run,v 5.2 88/01/12 06:23:43 kenj Exp $
  482. X13c13
  483. X< #    kill ls make mkdir rm sed test time touch tty who
  484. X---
  485. X> #    kill ls make mkdir rm sed test time touch tty umask who
  486. X17,39c17,40
  487. X< #    Test        Variable    Default        Use
  488. X< #    all        iterations    6        repeat count for timing
  489. X< #    arithmetic    arithloop    1000        no. of summations
  490. X< #    hanoi        ndisk        17        list of nos. of disks
  491. X< #    syscall        ncall        4000        no. iterations, each of
  492. X< #                            5 system calls
  493. X< #    context1    switch1        500        no. of switches
  494. X< #    pipe        io        2048        no. 512 byte blocks to
  495. X< #                            read and write
  496. X< #    spawn        children    100        no. of child processes
  497. X< #    execl        nexecs        100        no. of execs
  498. X< #    randmem,seqmem    arrays        8 64 512    list or array sizes
  499. X< #            poke        100000        no. array accesses
  500. X< #    fstime        blocks        62 125 250 500    list of file sizes
  501. X< #            where        .        directory for files
  502. X< #                            need 2 x max[ $blocks ]
  503. X< #    work        nusers        1 4 8 16 24 32     list of nos. of users
  504. X< #            rate        2        per user input rate
  505. X< #                            [ chars / sec ]
  506. X< #            ttys        /dev/tty    list of devices where
  507. X< #                            output goes
  508. X< #            dirs        .        list of directories for
  509. X< #                            creation of temp work
  510. X---
  511. X> #  Test        Variable    Default        Use
  512. X> #  all        iterations    6        repeat count for timing
  513. X> #  arithmetic    arithloop    1000        no. of summations
  514. X> #  hanoi    ndisk        17        list of nos. of disks
  515. X> #  syscall    ncall        4000        no. iterations, each of
  516. X> #                          5 system calls
  517. X> #  context1    switch1        500        no. of switches
  518. X> #  pipe        io        2048        no. 512 byte blocks to read
  519. X> #                          and write
  520. X> #  spawn    children    100        no. of child processes
  521. X> #  execl    nexecs        100        no. of execs
  522. X> #  randmem,seqmem
  523. X> #        arrays        8 64 512    list or array sizes
  524. X> #          poke        100000        no. array accesses
  525. X> #  fstime    blocks        62 125 250 500    list of file sizes
  526. X> #          where        .        directory for files
  527. X> #                          need 2 x max[ $blocks ]
  528. X> #  work        nusers        1 4 8 16 24 32     list of nos. of users
  529. X> #          rate        2        per user input rate
  530. X> #                          [ chars / sec ]
  531. X> #          ttys        /dev/tty    list of devices for tty output
  532. X> #          dirs        .        list of directories for
  533. X> #                          creation of temp work
  534. X> #          workdir        Workload    workload description dir
  535. X41c42,45
  536. X< if make source install
  537. X---
  538. X> umask 022    # at least mortals can read root's files this way
  539. X> bell=""
  540. X> workdir=${workdir-Workload} ; export workdir
  541. X> if make source install WORKDIR=$workdir
  542. X49,57c53,81
  543. X< if test $# -eq 0
  544. X< then
  545. X<     set -    arithoh register short int long float double dc hanoi \
  546. X<         syscall pipe context1 spawn execl \
  547. X<         C seqmem randmem fstime work
  548. X< elif test "$1" = "arithmetic"
  549. X< then
  550. X<     set -    arithoh register short int long float double dc
  551. X< fi
  552. X---
  553. X> 
  554. X> arithmetic="arithoh register short int long float double dc"
  555. X> system="syscall pipe context1 spawn execl fstime"
  556. X> misc="C seqmem randmem"
  557. X> args=""
  558. X> for word
  559. X> do
  560. X>     case $word
  561. X>     in
  562. X>     all)
  563. X>         ;;
  564. X>     arithmetic)
  565. X>         args="$args $arithmetic"
  566. X>         ;;
  567. X>     system)
  568. X>         args="$args $system"
  569. X>         ;;
  570. X>     speed)
  571. X>         args="$args $arithmetic $system"
  572. X>         ;;
  573. X>     *)
  574. X>         args="$args $word"
  575. X>         ;;
  576. X>     esac
  577. X> 
  578. X> done
  579. X> set - $args
  580. X> test $# -eq 0 && set - $arithmetic $system $misc work
  581. X> 
  582. X190d213
  583. X<         scripts=`echo Tmp/script.?`
  584. X205c228,229
  585. X<             if make script ttychk clock >/dev/null 2>$tmp
  586. X---
  587. X>             rm -f Tmp/script.1
  588. X>             if make scripts ttychk clock WORKDIR=$workdir 2>$tmp 1>&2
  589. X214c238,239
  590. X<             cmdline=`sed 1q Workload/script.master | sed 's/%W%[     ]*//'`
  591. X---
  592. X>             scripts=`echo Tmp/script.?`
  593. X>             cmdline=`sed 1q $workdir/script.master | sed 's/%W%[     ]*//'`
  594. X229d253
  595. X<             nscript=`echo Tmp/script.? | wc -w`
  596. X231c255
  597. X<             if ./ttychk $maxusers $orate $nscript $ttys 2>$tmp
  598. X---
  599. X>             if ./ttychk $maxusers $orate $ttys 2>$tmp
  600. X244,245c268,269
  601. X<         cd Workload 
  602. X<             if make context >/dev/null 2>../$tmp
  603. X---
  604. X>         cd $workdir 
  605. X>             if make context WORKDIR=$workdir 2>../$tmp 1>&2
  606. X246a271,272
  607. X>             :
  608. X>         else
  609. X247a274,284
  610. X>             cat $tmp
  611. X>             cat $tmp >>$log
  612. X>             rm -f $tmp
  613. X>             ./cleanup -l $log -r "\"make context\" failed in $workdir" -a
  614. X>             exit 1
  615. X>         fi
  616. X>             if make manifest WORKDIR=$workdir 2>../$tmp 1>&2
  617. X>         then
  618. X>             cd ..
  619. X>             manifest=`cat $tmp`
  620. X>             cplist=`cat $tmp | sed -e 's,^,$workdir/,' -e 's, , $workdir/,g'`
  621. X253c290
  622. X<             ./cleanup -l $log -r "\"make context\" failed in Workload" -a
  623. X---
  624. X>             ./cleanup -l $log -r "\"make manifest\" failed in $workdir" -a
  625. X255a293
  626. X>         user=0
  627. X257a296
  628. X>             ./iamalive $user
  629. X260c299,300
  630. X<             cp Workload/* $dir
  631. X---
  632. X>             eval cp $cplist $dir
  633. X>             user=`expr $user + 1`
  634. X263a304
  635. X>         echo "Current directory: " `pwd` >>$log
  636. X275c316,317
  637. X<         echo "This test generates lots of tty output"
  638. X---
  639. X>         ./signature >>$log
  640. X>         echo "${bell}${bell}This test generates lots of tty output"
  641. X284c326
  642. X<     if make $need >/dev/null 2>$tmp
  643. X---
  644. X>     if make $file WORKDIR=$workdir 2>$tmp 1>&2
  645. X291c333
  646. X<         ./cleanup -l $log -r "\"make $need\" failed!" -a
  647. X---
  648. X>         ./cleanup -l $log -r "\"make $file\" failed!" -a
  649. X330c372
  650. X<         test $prog = makework && ./cleanup -w
  651. X---
  652. X>         test $prog = ./makework && ./cleanup -w
  653. X346c388,391
  654. X<         ( cd Workload ; ls ) >/tmp/work$$
  655. X---
  656. X>         echo USER $manifest \
  657. X>         | sed 's/  */\
  658. X> /g' \
  659. X>         | sort >/tmp/work$$
  660. X352a398
  661. X>             echo "" >>$logwork
  662. X354c400
  663. X<             echo "   " `cat /tmp/x$$` >>$logwork
  664. X---
  665. X>             pr -t -l1 -w80 -5 /tmp/x$$ >>$logwork
  666. X358a405
  667. X>             echo "" >>$logwork
  668. X360c407
  669. X<             echo "   " `cat /tmp/x$$` >>$logwork
  670. X---
  671. X>             pr -t -l1 -w80 -5 /tmp/x$$ >>$logwork
  672. End-of-File-Grunt
  673. if test 5528 -ne `cat 'update.001' | wc -c`
  674. then
  675.     echo 'shar: transmission error (expected 5528 characters)'
  676. fi
  677. echo 'x - update.002'
  678. if test -f 'update.002'
  679. then
  680.     echo 'shar: over-writing existing file update.002'
  681. fi
  682. sed 's/^X//' > update.002 <<'End-of-File-Grunt'
  683. X15c15
  684. X<  *  #ifdef SysV        System V, times() returns real time
  685. X---
  686. X>  *  #ifdef SysV        System V, times() returns real time in (1/HZ)th of sec
  687. X17c17
  688. X<  *  $Header: mem.c,v 3.5 87/08/06 08:11:10 kenj Exp $
  689. X---
  690. X>  *  $Header: mem.c,v 5.2 88/01/12 06:06:44 kenj Exp $
  691. X28a29,33
  692. X> #ifdef SysV
  693. X> #include <sys/param.h>
  694. X> long    times();
  695. X> #endif
  696. X> 
  697. X35,42c40,47
  698. X<         int            *tab;
  699. X<         register char   *p;
  700. X<         register int    i;
  701. X<         register int    j;
  702. X<         register int    mask;
  703. X<         register int    k;
  704. X<     long             iter = 100000;
  705. X<     int         size = 8*1024 / sizeof(int);
  706. X---
  707. X>     int        *tab;
  708. X>         register char    *p;
  709. X>         register long    i;
  710. X>         register long    j;
  711. X>         register long    mask;
  712. X>         register int    k;
  713. X>     long        iter = 100000L;
  714. X>     long        size = 8*1024 / sizeof(int);
  715. X45a51
  716. X>     long        atol();
  717. X65c71
  718. X<                         size = atoi(&argv[1][2])*1024 / sizeof(int);
  719. X---
  720. X>                         size = atol(&argv[1][2])*1024 / sizeof(int);
  721. X68c74
  722. X<                         iter = atoi(&argv[1][2]);
  723. X---
  724. X>                         iter = atol(&argv[1][2]);
  725. X77c83
  726. X<         mask = size / sizeof(int);
  727. X---
  728. X>         mask = size;
  729. X80c86
  730. X<                 printf("%s: malloc failed for %d bytes\n", prog, size*sizeof(int));
  731. X---
  732. X>                 printf("%s: malloc failed for %ld bytes\n", prog, size*sizeof(int));
  733. X120c126
  734. X<         for (i = 0, k = 0; i < iter; i++) {
  735. X---
  736. X>         for (i = 0, k = 0; i < iter; i++, k++) {
  737. X122,123d127
  738. X<                 j = index[k];
  739. X<         k++;
  740. X124a129
  741. X>                 j = index[k];
  742. X126c131,132
  743. X<         j = i % mask;
  744. X---
  745. X>         if (k >= mask) k = 0;
  746. X>         j = k;
  747. X130a137
  748. X>     ohead[0] = ohead[0]*1000/HZ;    /* convert to millisec */
  749. X157a165
  750. X>     srand(j);    /* use value from loop to fool clever optimizers */
  751. X187c195
  752. X<         for (i = 0, k = 0; i < iter; i++) {
  753. X---
  754. X>         for (i = 0, k = 0; i < iter; i++, k++) {
  755. X189,190d196
  756. X<                 j = tab[index[k]];
  757. X<         k++;
  758. X191a198
  759. X>                 j = tab[index[k]];
  760. X193c200,201
  761. X<         j = tab[i % mask];
  762. X---
  763. X>         if (k >= mask) k = 0;
  764. X>         j = tab[k];
  765. X197a206
  766. X>     access[0] = access[0]*1000/HZ;    /* convert to millisec */
  767. X223,224c232,233
  768. X<     fprintf(stderr, "%d %d %.3f\n", iter, access[0] - ohead[0],
  769. X<             ((float)(access[1] - ohead[1]))/60.);
  770. X---
  771. X>     fprintf(stderr, "%ld %ld %.3f\n", iter, access[0] - ohead[0],
  772. X>             ((float)(access[1] - ohead[1]))/60);
  773. X227,230c236,239
  774. X<         printf("total real: %d msec cpu: %.1f sec\n", access[0], ((float)access[1])/60.);
  775. X<     printf("access real: %d msec cpu: %.1f sec\n", access[0] - ohead[0],
  776. X<             ((float)(access[1] - ohead[1]))/60.);
  777. X<         printf("%d Kbyte array: %.1f accesses per second\n", size*sizeof(int)/1024,
  778. X---
  779. X>         printf("total real: %ld msec cpu: %.1f sec\n", access[0], ((float)access[1])/60);
  780. X>     printf("access real: %ld msec cpu: %.1f sec\n", access[0] - ohead[0],
  781. X>             ((float)(access[1] - ohead[1]))/60);
  782. X>         printf("%ld Kbyte array: %.1f accesses per second\n", size*sizeof(int)/1024L,
  783. X232a242
  784. X>     srand(j);    /* use value from loop to fool clever optimizers */
  785. End-of-File-Grunt
  786. if test 3047 -ne `cat 'update.002' | wc -c`
  787. then
  788.     echo 'shar: transmission error (expected 3047 characters)'
  789. fi
  790. echo 'x - update.003'
  791. if test -f 'update.003'
  792. then
  793.     echo 'shar: over-writing existing file update.003'
  794. fi
  795. sed 's/^X//' > update.003 <<'End-of-File-Grunt'
  796. X2c2
  797. X<  * $Header: fstime.c,v 3.4 87/06/22 14:23:05 kjmcdonell Beta $
  798. X---
  799. X>  * $Header: fstime.c,v 5.2 87/12/09 14:48:05 kenj Exp $
  800. X9a10
  801. X> long    times();
  802. X31a33
  803. X>     char        *fname;
  804. X36a39
  805. X>     char        *mktemp();
  806. X62,67c65,77
  807. X<     close(creat("dummy0", 0600));
  808. X<     close(creat("dummy1", 0600));
  809. X<     f = open("dummy0", 2);
  810. X<     g = open("dummy1", 2);
  811. X<     unlink("dummy0");
  812. X<     unlink("dummy1");
  813. X---
  814. X>     fname = mktemp("fstXXXXXX");
  815. X>     close(creat(fname, 0600));
  816. X>     if ((f = open(fname, 2)) == -1) {
  817. X>     fprintf(stderr, "fstime: open file #1 \"%s\" failed!\n", fname);
  818. X>     exit(1);
  819. X>     }
  820. X>     unlink(fname);
  821. X>     close(creat(fname, 0600));
  822. X>     if ((g = open(fname, 2)) == -1) {
  823. X>     fprintf(stderr, "fstime: open file #2 \"%s\" failed!\n", fname);
  824. X>     exit(1);
  825. X>     }
  826. X>     unlink(fname);
  827. X89c99
  828. X<     if (write(f, buf, sizeof(buf)) <= 0)
  829. X---
  830. X>     if (write(f, buf, sizeof(buf)) != sizeof(buf)) {
  831. X90a101,102
  832. X>         exit(1);
  833. X>     }
  834. X138c150
  835. X<     if (read(f, buf, sizeof(buf)) <= 0)
  836. X---
  837. X>     if (read(f, buf, sizeof(buf)) != sizeof(buf)) {
  838. X139a152,153
  839. X>         exit(1);
  840. X>     }
  841. X187,190c201,208
  842. X<     if (read(f, buf, sizeof(buf)) <= 0)
  843. X<         perror("fstime: read in copy");
  844. X<     if (write(g, buf, sizeof(buf)) <= 0)
  845. X<         perror("fstime: write in copy");
  846. X---
  847. X>     if (read(f, buf, sizeof(buf)) != sizeof(buf)) {
  848. X>         perror("fstime: copy-read");
  849. X>         exit(1);
  850. X>     }
  851. X>     if (write(g, buf, sizeof(buf)) != sizeof(buf)) {
  852. X>         perror("fstime: copy-write");
  853. X>         exit(1);
  854. X>     }
  855. End-of-File-Grunt
  856. if test 1465 -ne `cat 'update.003' | wc -c`
  857. then
  858.     echo 'shar: transmission error (expected 1465 characters)'
  859. fi
  860. echo 'x - update.004'
  861. if test -f 'update.004'
  862. then
  863.     echo 'shar: over-writing existing file update.004'
  864. fi
  865. sed 's/^X//' > update.004 <<'End-of-File-Grunt'
  866. X4c4
  867. X<  *  $Header: pipe.c,v 3.5 87/06/22 14:32:36 kjmcdonell Beta $
  868. X---
  869. X>  *  $Header: pipe.c,v 5.2 87/12/09 15:35:32 kenj Exp $
  870. X14a15,16
  871. X>     if (argc > 1)
  872. X>         iter = atoi(argv[1]);
  873. End-of-File-Grunt
  874. if test 181 -ne `cat 'update.004' | wc -c`
  875. then
  876.     echo 'shar: transmission error (expected 181 characters)'
  877. fi
  878. echo 'x - update.005'
  879. if test -f 'update.005'
  880. then
  881.     echo 'shar: over-writing existing file update.005'
  882. fi
  883. sed 's/^X//' > update.005 <<'End-of-File-Grunt'
  884. X16c16
  885. X<  *  $Header: makework.c,v 3.9 87/09/17 05:55:13 kenj Exp $
  886. X---
  887. X>  *  $Header: makework.c,v 5.2 87/12/09 15:06:17 kenj Exp $
  888. X59a60
  889. X>     FILE    *uf;        /* user ordinal number file */
  890. X61,63c62
  891. X< #ifndef DEBUG
  892. X<     freopen("Tmp/masterlog.00", "a", stderr);
  893. X< #endif
  894. X---
  895. X>     freopen("Tmp/masterlog.00", "w", stderr);
  896. X105,106c104,105
  897. X<     /* clone copies of myself to run up to MAXSTREAM jobs each */
  898. X<     firstuser = MAXSTREAM;
  899. X---
  900. X>     /* clone copies of myself to run up to MAXSTREAM users each */
  901. X>     firstuser = 0;
  902. X109a109
  903. X>     cmseq++;
  904. X111,116c111,113
  905. X<     if (nusers >= 2*MAXSTREAM)
  906. X<         /* the next clone must run MAXSTREAM jobs */
  907. X<         nstream = MAXSTREAM;
  908. X<     else
  909. X<         /* the next clone must run the leftover jobs */
  910. X<         nstream = nusers - MAXSTREAM;
  911. X---
  912. X>     sprintf(logname, "Tmp/masterlog.%02d", cmseq);
  913. X>     freopen(logname, "w", stderr);
  914. X>     nstream = MAXSTREAM;
  915. X122c119
  916. X<     cmseq = firstuser/MAXSTREAM;
  917. X---
  918. X>     fflush(stderr);
  919. X124a122
  920. X>         freopen("Tmp/masterlog.00", "a", stderr);
  921. X127a126,127
  922. X>         /* I am the master with nstream fewer users to run */
  923. X>         freopen("Tmp/masterlog.00", "a", stderr);
  924. X129d128
  925. X<         /* I am the master with nstream fewer jobs to run */
  926. X131c130
  927. X<         firstuser += MAXSTREAM;
  928. X---
  929. X>         firstuser += nstream;
  930. X134c133
  931. X<         /* I am a clone, run MAXSTREAM jobs */
  932. X---
  933. X>         /* I am a clone, run nstream users */
  934. X137,140d135
  935. X< #ifndef DEBUG
  936. X<         sprintf(logname, "Tmp/masterlog.%02d", cmseq);
  937. X<         freopen(logname, "w", stderr);
  938. X< #endif
  939. X145d139
  940. X<     firstuser = 0;
  941. X175d168
  942. X< #ifndef DEBUG
  943. X178d170
  944. X< #endif
  945. X196,198c188,190
  946. X<         sprintf(logname, "USER.%02d", firstuser+i);
  947. X<         if (close(creat(logname, 0600)) == -1) {
  948. X<         fprintf(stderr, "makework: creat \"%s\" failed!\n", logname);
  949. X---
  950. X>         if ((uf = fopen("USER", "w")) == NULL) {
  951. X>         fprintf(stderr, "makework: creat \"USER\" failed for user %d!\n",
  952. X>             firstuser+i);
  953. X201a194,195
  954. X>         fprintf(uf, "%d\n", firstuser+i);
  955. X>         fclose(uf);
  956. X313c307
  957. X<  *  5 minutes should be ample, since the time to run all jobs is of
  958. X---
  959. X>  *  5 minutes should be ample, since the time to run all users is of
  960. X315c309
  961. X<  *  so the timeout has been set at 20 minutes (1200 seconds).
  962. X---
  963. X>  *  so the timeout has been set at 30 minutes (1800 seconds).
  964. X318c312
  965. X<     alarm(1200);
  966. X---
  967. X>     alarm(1800);
  968. X336c330
  969. X<         fprintf(stderr, "clone %d done, pid %d ", cmseq, c);
  970. X---
  971. X>         fprintf(stderr, "clone done, pid %d ", c);
  972. X364c358
  973. X<     wrapup("Timed out waiting for jobs to finish ...");
  974. X---
  975. X>     wrapup("Timed out waiting for users to finish ...");
  976. End-of-File-Grunt
  977. if test 2554 -ne `cat 'update.005' | wc -c`
  978. then
  979.     echo 'shar: transmission error (expected 2554 characters)'
  980. fi
  981. echo 'x - update.006'
  982. if test -f 'update.006'
  983. then
  984.     echo 'shar: over-writing existing file update.006'
  985. fi
  986. sed 's/^X//' > update.006 <<'End-of-File-Grunt'
  987. X3c3
  988. X< static char RCSid[] = "$Header: util.c,v 1.3 87/06/23 15:56:41 kjmcdonell Beta $";
  989. X---
  990. X> static char RCSid[] = "$Header: util.c,v 5.2 87/12/09 16:58:23 kenj Exp $";
  991. X24a25,26
  992. X> extern int firstuser;
  993. X> 
  994. X31,32c33,34
  995. X<     fprintf(stderr, "job %d: cmd: %s home: %s tty: %s\n",
  996. X<         i, work[i].cmd, work[i].home, work[i].tty);
  997. X---
  998. X>     fprintf(stderr, "user %d: cmd: %s home: %s tty: %s\n",
  999. X>         firstuser+i, work[i].cmd, work[i].home, work[i].tty);
  1000. End-of-File-Grunt
  1001. if test 444 -ne `cat 'update.006' | wc -c`
  1002. then
  1003.     echo 'shar: transmission error (expected 444 characters)'
  1004. fi
  1005. echo 'x - update.007'
  1006. if test -f 'update.007'
  1007. then
  1008.     echo 'shar: over-writing existing file update.007'
  1009. fi
  1010. sed 's/^X//' > update.007 <<'End-of-File-Grunt'
  1011. X3c3
  1012. X< static char RCSid[] = "$Header: getwork.c,v 1.3 87/06/23 17:01:47 kjmcdonell Beta $";
  1013. X---
  1014. X> static char RCSid[] = "$Header: getwork.c,v 5.2 87/12/09 14:51:26 kenj Exp $";
  1015. X8c8
  1016. X<  * of job streams.
  1017. X---
  1018. X>  * of users.
  1019. X46c46
  1020. X<         fprintf(stderr, "Insufficient job streams in the workload file\n");
  1021. X---
  1022. X>         fprintf(stderr, "Insufficient user work specifications in the workload file\n");
  1023. X63,64d62
  1024. X<     if (w->home != (char *)0)
  1025. X<         free(w->home);
  1026. X118c116
  1027. X<         /* standard output for this job */
  1028. X---
  1029. X>         /* standard output for this user */
  1030. X124,125d121
  1031. X<         if (w->tty != (char *)0)
  1032. X<             free(w->tty);
  1033. X132c128
  1034. X<         /* standard input for this job */
  1035. X---
  1036. X>         /* standard input for this user */
  1037. End-of-File-Grunt
  1038. if test 697 -ne `cat 'update.007' | wc -c`
  1039. then
  1040.     echo 'shar: transmission error (expected 697 characters)'
  1041. fi
  1042. echo 'x - update.008'
  1043. if test -f 'update.008'
  1044. then
  1045.     echo 'shar: over-writing existing file update.008'
  1046. fi
  1047. sed 's/^X//' > update.008 <<'End-of-File-Grunt'
  1048. X7,8c7,8
  1049. X<  *  of "rate" characters per second, and copied to "copyfile" if
  1050. X<  *  specified
  1051. X---
  1052. X>  *  of "rate" characters per second, and optinally echoed to another
  1053. X>  *  file/device.
  1054. X13c13
  1055. X<  *  $Header: keyb.c,v 3.5 87/06/22 14:24:28 kjmcdonell Beta $
  1056. X---
  1057. X>  *  $Header: keyb.c,v 5.2 87/12/09 15:01:18 kenj Exp $
  1058. X23c23
  1059. X< int    est_rate = DEF_RATE;
  1060. X---
  1061. X> float    est_rate = DEF_RATE;
  1062. X56c56,59
  1063. X<     if ((p = getenv("tty")) != (char *)0) {
  1064. X---
  1065. X>     /*
  1066. X>      * No echoing if env var either undefined or a null string.
  1067. X>      */
  1068. X>     if ((p = getenv("tty")) != (char *)0 && *p != '\0') {
  1069. X87c90,94
  1070. X<     if (nch == 0)
  1071. X---
  1072. X>     if (nch < 0) {
  1073. X>         perror("keyb: ** read error **");
  1074. X>         exit(4);
  1075. X>     }
  1076. X>     else if (nch == 0)
  1077. X90a98
  1078. X>         buf[nch] = '\0';
  1079. X92c100
  1080. X<         fprintf(stderr, "type: ** SIGPIPE error ** buf: %s\n", buf);
  1081. X---
  1082. X>         fprintf(stderr, "keyb: ** SIGPIPE error ** buf: %s\n", buf);
  1083. X94c102,103
  1084. X<         fprintf(stderr, "type: ** write error ** buf: %s\n", buf);
  1085. X---
  1086. X>         fprintf(stderr, "keyb: ** write error ** wrote %d of %d from buf: \"%s\"\n", written, nch, buf);
  1087. X>         perror("keyb is dying...");
  1088. End-of-File-Grunt
  1089. if test 1103 -ne `cat 'update.008' | wc -c`
  1090. then
  1091.     echo 'shar: transmission error (expected 1103 characters)'
  1092. fi
  1093. echo 'x - update.009'
  1094. if test -f 'update.009'
  1095. then
  1096.     echo 'shar: over-writing existing file update.009'
  1097. fi
  1098. sed 's/^X//' > update.009 <<'End-of-File-Grunt'
  1099. X4c4
  1100. X<  *  $Header: clock.c,v 3.4 87/06/22 14:22:54 kjmcdonell Beta $
  1101. X---
  1102. X>  *  $Header: clock.c,v 5.2 87/12/09 14:42:34 kenj Exp $
  1103. X18a19
  1104. X> long    times();
  1105. End-of-File-Grunt
  1106. if test 153 -ne `cat 'update.009' | wc -c`
  1107. then
  1108.     echo 'shar: transmission error (expected 153 characters)'
  1109. fi
  1110. echo 'x - update.010'
  1111. if test -f 'update.010'
  1112. then
  1113.     echo 'shar: over-writing existing file update.010'
  1114. fi
  1115. sed 's/^X//' > update.010 <<'End-of-File-Grunt'
  1116. X5c5
  1117. X<  * $Header: ttychk.c,v 3.6 87/06/22 14:32:58 kjmcdonell Beta $
  1118. X---
  1119. X>  * $Header: ttychk.c,v 5.2 87/12/09 16:57:02 kenj Exp $
  1120. X31c31
  1121. X<     int        nscript;    /* number of script files */
  1122. X---
  1123. X>     int        need;        /* max ttys that could be used */
  1124. X35c35
  1125. X<     int        nttys;        /* number of active ttys */
  1126. X---
  1127. X>     int        nttys = 0;    /* number of required ttys */
  1128. X42,43c42,43
  1129. X<     if (argc < 5) {
  1130. X<         fprintf(stderr, "Usage: ttychk nusers orate nscript ttydev ... \n");
  1131. X---
  1132. X>     if (argc < 4) {
  1133. X>         fprintf(stderr, "Usage: ttychk nusers orate ttydev ... \n");
  1134. X52,56d51
  1135. X<     nscript = atoi(argv[3]);
  1136. X<     if (nscript < 1) {
  1137. X<         fprintf(stderr, "ttychk: nscript must be > 0\n");
  1138. X<         status |= 1;
  1139. X<     }
  1140. X58c53
  1141. X<     nttys = nusers <= nscript ? nusers : nscript;
  1142. X---
  1143. X>     need = nusers;
  1144. X61c56
  1145. X<     for (i = 4; i < argc && nttys; i++, nttys--) {
  1146. X---
  1147. X>     for (i = 3; i < argc && need; i++, nttys++, need--) {
  1148. X95d89
  1149. X<     nttys = nusers <= nscript ? nusers : nscript;
  1150. End-of-File-Grunt
  1151. if test 915 -ne `cat 'update.010' | wc -c`
  1152. then
  1153.     echo 'shar: transmission error (expected 915 characters)'
  1154. fi
  1155. echo 'x - update.011'
  1156. if test -f 'update.011'
  1157. then
  1158.     echo 'shar: over-writing existing file update.011'
  1159. fi
  1160. sed 's/^X//' > update.011 <<'End-of-File-Grunt'
  1161. X#! /bin/sh
  1162. X# $Header: MAKE,v 5.2 87/12/14 10:53:32 kenj Exp $
  1163. X# Compensation for the inadequacies of make.
  1164. X
  1165. Xfor dir in Work* Tools
  1166. Xdo
  1167. X    test -d $dir || continue
  1168. X    echo ${dir}:
  1169. X    cd $dir
  1170. X    test -f Makefile || co Makefile
  1171. X        make $1
  1172. X    cd ..
  1173. Xdone
  1174. End-of-File-Grunt
  1175. if test 244 -ne `cat 'update.011' | wc -c`
  1176. then
  1177.     echo 'shar: transmission error (expected 244 characters)'
  1178. fi
  1179. echo 'x - update.012'
  1180. if test -f 'update.012'
  1181. then
  1182.     echo 'shar: over-writing existing file update.012'
  1183. fi
  1184. sed 's/^X//' > update.012 <<'End-of-File-Grunt'
  1185. X#! /bin/sh
  1186. X# Package things up ready for a distribution
  1187. X# $Header: mkdistrib,v 5.2 87/12/09 15:10:22 kenj Exp $
  1188. X
  1189. Xmake purge >/dev/null
  1190. X
  1191. Xfor dir in *
  1192. Xdo
  1193. X    test -d $dir -a $dir != "RCS" -a $dir != "Tmp" || continue
  1194. X    echo ${dir}:
  1195. X    cd $dir
  1196. X    if test "`echo *`" != '*'
  1197. X    then
  1198. X        if test -f Makefile
  1199. X        then
  1200. X            make purge >/dev/null
  1201. X        fi
  1202. X        args=""
  1203. X        for file in *
  1204. X        do
  1205. X            test -d $file && continue
  1206. X            if test -f "../$file"
  1207. X            then
  1208. X                ver=1
  1209. X                while test -f ../$file,$ver
  1210. X                do
  1211. X                    ver=`expr $ver + 1`
  1212. X                done
  1213. X                mv $file $file,$ver
  1214. X                args="$args $file,$ver"
  1215. X            else
  1216. X                args="$args $file"
  1217. X            fi
  1218. X        done
  1219. X        if test "$args" != ""
  1220. X        then
  1221. X            ls $args >../$dir.mf
  1222. X            mv $args ..
  1223. X        fi
  1224. X    fi
  1225. X    cd ..
  1226. Xdone
  1227. X
  1228. Xrm -rf Tmp
  1229. End-of-File-Grunt
  1230. if test 702 -ne `cat 'update.012' | wc -c`
  1231. then
  1232.     echo 'shar: transmission error (expected 702 characters)'
  1233. fi
  1234. echo 'x - update.013'
  1235. if test -f 'update.013'
  1236. then
  1237.     echo 'shar: over-writing existing file update.013'
  1238. fi
  1239. sed 's/^X//' > update.013 <<'End-of-File-Grunt'
  1240. X3,4c3,4
  1241. X< # $Header: mkinstall,v 1.3 87/09/10 05:08:45 kenj Exp $
  1242. X< for list in *.files
  1243. X---
  1244. X> # $Header: mkinstall,v 5.2 87/12/09 15:11:56 kenj Exp $
  1245. X> for list in *.mf
  1246. X6c6
  1247. X<     if test "$list" = '*.files'
  1248. X---
  1249. X>     if test "$list" = '*.mf'
  1250. X10c10
  1251. X<     dir=`echo $list | sed 's/.files//'`
  1252. X---
  1253. X>     dir=`echo $list | sed 's/.mf//'`
  1254. End-of-File-Grunt
  1255. if test 333 -ne `cat 'update.013' | wc -c`
  1256. then
  1257.     echo 'shar: transmission error (expected 333 characters)'
  1258. fi
  1259. echo 'x - update.014'
  1260. if test -f 'update.014'
  1261. then
  1262.     echo 'shar: over-writing existing file update.014'
  1263. fi
  1264. sed 's/^X//' > update.014 <<'End-of-File-Grunt'
  1265. X2c2
  1266. X< # $Header: mkscript,v 1.2 87/06/22 14:35:54 kjmcdonell Beta $
  1267. X---
  1268. X> # $Header: mkscript,v 5.2 87/12/09 15:21:41 kenj Exp $
  1269. X4a5
  1270. X> # **assumption**  run from a Workload directory -- so ../mkperm is sensible!
  1271. X11a13
  1272. X> tmp=/tmp/$$
  1273. X27,28c29,30
  1274. X<     awk '
  1275. X< BEGIN    { '"`./mkperm -s $k $ns | sed 's/[0-9][0-9]*/perm[i++] = &;/g`"' nj=0 }
  1276. X---
  1277. X>     awk '
  1278. X> BEGIN    { '"`../mkperm -s $k $ns | sed 's/[0-9][0-9]*/perm[i++] = &;/g`"' nj=0 }
  1279. X30a33
  1280. X> /^%/    { next }
  1281. X36c39
  1282. X< END    { print job[0]
  1283. X---
  1284. X> END    { if (job[0] != "") print job[0]
  1285. X39,41c42,84
  1286. X<       print job[nj]
  1287. X<     }' $1 > script.$k
  1288. X<     k=`expr $k + 1`
  1289. X---
  1290. X>       if (job[nj] != "") print job[nj]
  1291. X>       print "End-of-Script"
  1292. X>     }' $1 \
  1293. X>     | awk '
  1294. X>         { print }
  1295. X> /^\.\/keyb /    { print "%include",$2 }
  1296. X> /^keyb /    { print "%include",$2 }' >${tmp}a
  1297. X> 
  1298. X>     echo "BEGIN     {" >${tmp}b
  1299. X>     grep '%include' ${tmp}a \
  1300. X>     | sed 's/%include //' \
  1301. X>     | while read file
  1302. X>     do
  1303. X>     echo "    fill[\"$file\"]=`cat $file | wc -c`" >>${tmp}b
  1304. X>     done
  1305. X> 
  1306. X>     cat >>${tmp}b <<'End-of-File'
  1307. X>         }
  1308. X> /^%include/    { nch=fill[$2]
  1309. X>           need=1
  1310. X>           next
  1311. X>         }
  1312. X> need==1 && fg==1{ f=0
  1313. X>           while (f+70 <= nch) {
  1314. X>             printf ": +%05d+ FILLER Mary had a little lamb, its fleece was white as snow\n",f
  1315. X>             f += 70
  1316. X>           }
  1317. X>           printf ": +%05d+ ",nch
  1318. X>           f += 11
  1319. X>           while (f++ < nch)
  1320. X>             printf "x"
  1321. X>           print ""
  1322. X>           need=0
  1323. X>         }
  1324. X> /^End-of-Script$/    { exit }
  1325. X>         { fg=1 }
  1326. X> /&$/        { fg=0 }
  1327. X>         { print }
  1328. X> End-of-File
  1329. X> 
  1330. X>     rm -f script.$k
  1331. X>     awk -f ${tmp}b ${tmp}a > script.$k
  1332. X>     k=`expr $k + 1`
  1333. X42a86,89
  1334. X> 
  1335. X> rm -f ${tmp}*
  1336. X> 
  1337. X> exit 0
  1338. End-of-File-Grunt
  1339. if test 1587 -ne `cat 'update.014' | wc -c`
  1340. then
  1341.     echo 'shar: transmission error (expected 1587 characters)'
  1342. fi
  1343. echo 'x - update.015'
  1344. if test -f 'update.015'
  1345. then
  1346.     echo 'shar: over-writing existing file update.015'
  1347. fi
  1348. sed 's/^X//' > update.015 <<'End-of-File-Grunt'
  1349. X#! /bin/sh
  1350. X# try running a script a catching the output
  1351. X# $Header: mkscript.out,v 5.2 87/12/09 15:34:15 kenj Exp $
  1352. Xtmp=/tmp/$$
  1353. Xcmdline=`sed 1q script.master | grep '^%W%' | sed 's/%W%[     ]*//'`
  1354. Xif test "$cmdline" = ""
  1355. Xthen
  1356. X    echo "mkscript.out: illegal %W% record at beginning of \"script.master\""
  1357. X    exit 1
  1358. Xfi
  1359. X
  1360. Xif make clean context
  1361. Xthen
  1362. X    :
  1363. Xelse
  1364. X    echo "mkscript.out: \"make clean context\" failed!"
  1365. X    exit 1
  1366. Xfi
  1367. X
  1368. Xif test ! -f script.1
  1369. Xthen
  1370. X    echo "mkscript.out: cannot find \"script.1\""
  1371. X    exit 1
  1372. Xfi
  1373. X
  1374. X# skip the control lines
  1375. Xhere=`grep -v '^%' script.master | wc -l | sed 's/  *//'`
  1376. X# skip the filler text associated with keyb usage
  1377. Xthere=`grep -v '^: +[0-9][0-9]*+ ' script.1 | wc -l | sed 's/  *//'`
  1378. Xif test "$here" -ne "$there"
  1379. Xthen
  1380. X    echo "mkscript.out: script.master ($here cmds) differs from script.1 ($there cmds)"
  1381. X    exit 1
  1382. Xfi
  1383. Xrm -f script.out
  1384. Xcp script.1 script.out
  1385. Xrm -f sterr.bad
  1386. X
  1387. Xrate=500 tty=/dev/null ; export tty rate
  1388. Xmkdir .tmp
  1389. Xif cp `make manifest` .tmp
  1390. Xthen
  1391. X    :
  1392. Xelse
  1393. X    echo "mkscript.out: \"cp\" failed!"
  1394. X    rm -rf script.out .tmp ${tmp}*
  1395. X    exit 1
  1396. Xfi
  1397. Xcd .tmp
  1398. Xecho "0" >USER
  1399. Xif $cmdline ../script.1 >>../script.out 2>${tmp}a
  1400. Xthen
  1401. X    :
  1402. Xelse
  1403. X    cd ..
  1404. X    echo "mkscript.out: fatal error ... see \"script.out.bad\""
  1405. X    mv script.out script.out.bad
  1406. X    cat ${tmp}a >>script.out.bad
  1407. X    rm -rf .tmp ${tmp}*
  1408. X    exit 1
  1409. Xfi
  1410. X
  1411. Xcd ..
  1412. Xif test -f cleanstderr
  1413. Xthen
  1414. X    ( cat ${tmp}a ; echo "" ) | ./cleanstderr >${tmp}b
  1415. Xelse
  1416. X    cp ${tmp}a ${tmp}b
  1417. Xfi
  1418. Xif test -s ${tmp}b
  1419. Xthen
  1420. X    echo "mkscript.out: unexpected std error output ..."
  1421. X    sed 's/^/    /' ${tmp}b
  1422. X    mv ${tmp}a stderr.bad
  1423. X    rm -rf script.out .tmp ${tmp}*
  1424. X    exit 1
  1425. Xfi
  1426. X
  1427. Xrm -rf .tmp ${tmp}*
  1428. End-of-File-Grunt
  1429. if test 1685 -ne `cat 'update.015' | wc -c`
  1430. then
  1431.     echo 'shar: transmission error (expected 1685 characters)'
  1432. fi
  1433. echo 'x - update.016'
  1434. if test -f 'update.016'
  1435. then
  1436.     echo 'shar: over-writing existing file update.016'
  1437. fi
  1438. sed 's/^X//' > update.016 <<'End-of-File-Grunt'
  1439. X#! /bin/sh
  1440. X# Replace XXX by parent dir and current dir [ -w specified ] into $PATH
  1441. X# for scripts.
  1442. X# Used from Work* dirs.
  1443. X# $Header: fixPATH,v 5.2 87/12/09 14:43:08 kenj Exp $
  1444. X
  1445. Xtmp=/tmp/$$
  1446. Xdir=`cd ..;pwd`
  1447. Xtest $# -eq 1 -a "X$1X" = "X-wX" && dir="$dir:"`pwd`
  1448. X
  1449. Xfor s in script.[0-9]*
  1450. Xdo
  1451. X    sed -e s,PATH=XXX,PATH=$dir, $s >$tmp
  1452. X    rm -f $s
  1453. X    mv $tmp $s
  1454. Xdone
  1455. X
  1456. Xrm -f $tmp
  1457. End-of-File-Grunt
  1458. if test 372 -ne `cat 'update.016' | wc -c`
  1459. then
  1460.     echo 'shar: transmission error (expected 372 characters)'
  1461. fi
  1462. echo 'x - update.017'
  1463. if test -f 'update.017'
  1464. then
  1465.     echo 'shar: over-writing existing file update.017'
  1466. fi
  1467. sed 's/^X//' > update.017 <<'End-of-File-Grunt'
  1468. X#! /bin/sh
  1469. X#
  1470. X#  Produce histograms and marks statistics
  1471. X#
  1472. X# $Header: qhisto,v 5.3 88/01/19 07:31:35 kenj Exp $
  1473. Xif test $# -gt 0 -a X$1X = X-dX
  1474. Xthen
  1475. X    debug=1
  1476. X    shift
  1477. Xfi
  1478. X
  1479. Xif test $# -eq 0
  1480. Xthen
  1481. X    cat > /tmp/qh$$
  1482. X    trap "rm -f /tmp/qh$$ ; exit" 0 1 2 3 15
  1483. X    file=/tmp/qh$$
  1484. Xelif test $# -eq 1
  1485. Xthen
  1486. X    file=$1
  1487. Xelse
  1488. X    echo "Usage: qhisto [ file ]"
  1489. X    exit 1
  1490. Xfi
  1491. X
  1492. Xmaxq=`awk "NR==1 {print NF; exit}" <$file`
  1493. Xif test "$maxq" = 0
  1494. Xthen
  1495. X    maxq=1
  1496. Xfi
  1497. Xq=1
  1498. Xwhile test "$q" -le "$maxq"
  1499. Xdo
  1500. Xawk < $file '
  1501. XBEGIN    { q='$q'; debug='${debug-0}' }
  1502. XNR == 1 { min=$q }
  1503. Xq == 0 {
  1504. X    x=0; summary=1
  1505. X    for (i=1; i<=NF; i++)
  1506. X        if ($i != "-") x += $i
  1507. X    dat[x]++; sum += x; count++
  1508. X    if (x > max) max=x
  1509. X    if (x < min) min=x
  1510. X    next
  1511. X    }
  1512. X$q != "-" {
  1513. X    dat[$q]++; sum += $q; count++
  1514. X    if ($q > max) max=$q
  1515. X    if ($q < min) min=$q
  1516. X    }
  1517. X$q ~ /[^0-9 -\.]/    { alpha=1 }
  1518. XEND {
  1519. X    print; print; print
  1520. X    if (summary != 1) {
  1521. X        printf "Question %d)",q
  1522. X        printf "  Answers: %d",count
  1523. X    } else
  1524. X        printf "Total Across All Questions  Students: %d", count
  1525. X    if (count > 0) printf "  Mean Mark: %.2f",sum/count
  1526. X    if (alpha) {
  1527. X        min=0 ; max=0
  1528. X        for (i in dat) max++
  1529. X    }
  1530. X    if (debug) {
  1531. X        printf "\nmax=%s min=%s\n",max,min
  1532. X        for (i in dat) printf "dat[%s]=%d ",i,dat[i]
  1533. X    }
  1534. X    print; print
  1535. X    hscale=1
  1536. X    if (!alpha) {
  1537. X        width=70
  1538. X        ok=0
  1539. X        while (!ok) {
  1540. X        hscale=(1+max-min)/width
  1541. X        if (hscale < 1) {
  1542. X            j=1
  1543. X            f=1
  1544. X            while (f>hscale) {
  1545. X            f /= 10
  1546. X            j *= 10
  1547. X            }
  1548. X            hscale *= j
  1549. X            if (hscale >= 4)
  1550. X            hscale=4
  1551. X            else if (hscale >= 2)
  1552. X            hscale=2
  1553. X            else
  1554. X            hscale=1
  1555. X            hscale /= j
  1556. X        }
  1557. X        else if (hscale > 1) {
  1558. X            hscale=int(hscale)
  1559. X            d=length(hscale)-1
  1560. X            j=1
  1561. X            while (d) {
  1562. X              j *= 10
  1563. X              d--
  1564. X            }
  1565. X            hscale /= j
  1566. X            if (hscale >= 5)
  1567. X            hscale=5
  1568. X            else if (hscale >= 2.5)
  1569. X            hscale=2.5
  1570. X            else
  1571. X            hscale=1
  1572. X            hscale *= j
  1573. X        }
  1574. X        min=int(min/(5*hscale))*5*hscale
  1575. X        if (max/hscale != int(max/hscale))
  1576. X            max=(int(max/hscale)+1)*hscale
  1577. X        if (debug) printf "max=%s min=%s\n",max,min
  1578. X        if (1+(max-min)/hscale > 70)
  1579. X            width -= 10
  1580. X        else
  1581. X            ok=1
  1582. X        if (debug) print "hscale=" hscale " width=" width
  1583. X        }
  1584. X        if (debug) print "hscale=" hscale
  1585. X        if (hscale != 1) {
  1586. X        k=0
  1587. X        max += hscale*2
  1588. X        for (i=min; i<=max; i += hscale) {
  1589. X            cnt=0
  1590. X            for (d in dat) {
  1591. X            if (0+i <= 0+d && 0+d < i+hscale) {
  1592. X                cnt += dat[d]
  1593. X                if (debug) print i,"<= data",d,"<",i+hscale,", cum freq=",cnt
  1594. X            }
  1595. X            }
  1596. X            if (cnt > 0)
  1597. X            hist[k]=cnt
  1598. X            k++
  1599. X        }
  1600. X        max=k-1
  1601. X        }
  1602. X        else {
  1603. X        for (i in dat) hist[i-min]=dat[i]
  1604. X        max=max-min
  1605. X        }
  1606. X        if (debug) printf "max=%s min=%s hscale=%s\n",max,min,hscale
  1607. X    }
  1608. X    else
  1609. X        for (i in dat) hist[i]=dat[i]
  1610. X    if (debug) for (i in hist) printf "hist[%s]=%d ",i,hist[i] ; print ""
  1611. X    fill=int((70-(max+1-min))/(max+1-min))
  1612. X    if (fill > 4) fill=4
  1613. X    else if (fill < 0) fill=0
  1614. X    if (debug) print "fill=" fill
  1615. X    pad=""; dash=""
  1616. X    for (k=fill; k>0; k--) {
  1617. X        pad=pad " "
  1618. X        dash=dash "-"
  1619. X    }
  1620. X    skip=1
  1621. X    if (fill == 2) skip=2
  1622. X    else if (fill == 1 || fill == 0) skip=5
  1623. X    for (i in hist) if (hist[i] > maxfreq) maxfreq=hist[i]
  1624. X    vscale=int((maxfreq+19)/20)
  1625. X    if (vscale < 1) vscale=1
  1626. X    jmax=int((maxfreq+vscale-1)/vscale)*vscale
  1627. X    j=jmax
  1628. X    while (j > 0) {
  1629. X        if (j == jmax || j % (vscale*5) == 0) printf "%3d + ",j
  1630. X        else printf "    + "
  1631. X        if (j % (vscale*5) == 0) {
  1632. X        s1=dash
  1633. X        s2=dash "-"
  1634. X        }
  1635. X        else {
  1636. X        s1=pad
  1637. X        s2=pad " "
  1638. X        }
  1639. X        thres=j-vscale/2
  1640. X        if (!alpha) {
  1641. X            for (i=0; i<=max; i++) {
  1642. X            if (hist[i] >= thres) printf "%s*",s1
  1643. X            else printf s2
  1644. X            }
  1645. X        }
  1646. X        else {
  1647. X            for (i in hist) {
  1648. X            if (hist[i] >= thres) printf "%s*",s1
  1649. X            else printf s2
  1650. X            }
  1651. X        }
  1652. X        print; j -= vscale
  1653. X    }
  1654. X    printf "      "
  1655. X    if (alpha)
  1656. X        for (i in hist) printf "%s+",dash
  1657. X    else {
  1658. X        for (i=0; i<=max; i++) {
  1659. X        if (i % skip == 0) printf "%s+",dash
  1660. X        else printf "%s-",dash
  1661. X        }
  1662. X    }
  1663. X    print
  1664. X    if (alpha) {
  1665. X        p=1; more=1
  1666. X        while (more) {
  1667. X        more=0; printf "      "
  1668. X        for (i in hist) {
  1669. X            if (length(i)>=p) {
  1670. X            c=substr(i, p, 1)
  1671. X            printf "%s%s",pad,c
  1672. X            if (length(i)>=p+1) more++
  1673. X            }
  1674. X            else printf "%s ",pad
  1675. X        }
  1676. X        print; p++
  1677. X        }
  1678. X    }
  1679. X    else {
  1680. X        d = int(min+max*hscale)
  1681. X        if (d >= 10) {
  1682. X        p = log(d)/log(10)
  1683. X        if (p != int(p)) p = 1+int(p)
  1684. X        }
  1685. X        else
  1686. X        p = 1
  1687. X        j=1
  1688. X        while (p) {
  1689. X        j *= 10
  1690. X        p--
  1691. X        }
  1692. X        for (; j>=1; j=int(j/10)) {
  1693. X        if (min+max*hscale < j && j > 1) continue
  1694. X        printf "      "
  1695. X        val=min
  1696. X        for (i=0; i<=max; i++) {
  1697. X            if ((i%skip == 0) && (val+0.001>=j || j==1)) printf "%s%d",pad,(0.001+(val/j))%10
  1698. X            else printf "%s ",pad
  1699. X            val += hscale
  1700. X        }
  1701. X        print ""
  1702. X        }
  1703. X        if (hscale < 1) {
  1704. X        printf "      "
  1705. X        val=min
  1706. X        for (i=0; i<=max; i++) {
  1707. X            if (i%skip == 0) printf "%s.",pad
  1708. X            else printf "%s ",pad
  1709. X            val += hscale
  1710. X        }
  1711. X        print ""
  1712. X        p = -log(hscale)/log(10)
  1713. X        if (p != int(p)) p = int(p)
  1714. X        j=1
  1715. X        while (p) {
  1716. X            printf "      "
  1717. X            val=min*j
  1718. X            for (i=0; i<=max; i++) {
  1719. X            val -= int(val)
  1720. X            d = int(10*val+0.001)
  1721. X            if (d == 10) d = 0
  1722. X            if (i%skip == 0) {
  1723. X                printf "%s%d",pad,d
  1724. X            }
  1725. X            else printf "%s ",pad
  1726. X            val += hscale*j
  1727. X            }
  1728. X            print ""
  1729. X            j *= 10
  1730. X            p--
  1731. X        }
  1732. X        }
  1733. X    }
  1734. X    }
  1735. X'
  1736. Xif test "$q" -eq 0
  1737. Xthen
  1738. X    exit
  1739. Xfi
  1740. Xif test "$q" -eq "$maxq" -a "$maxq" -gt 1
  1741. Xthen
  1742. X    q=0
  1743. Xelse
  1744. X    q=`expr $q + 1`
  1745. Xfi
  1746. Xdone
  1747. End-of-File-Grunt
  1748. if test 5254 -ne `cat 'update.017' | wc -c`
  1749. then
  1750.     echo 'shar: transmission error (expected 5254 characters)'
  1751. fi
  1752. echo 'x - update.018'
  1753. if test -f 'update.018'
  1754. then
  1755.     echo 'shar: over-writing existing file update.018'
  1756. fi
  1757. sed 's/^X//' > update.018 <<'End-of-File-Grunt'
  1758. X#! /bin/sh
  1759. X# $Header: Groan,v 5.2 87/12/09 08:58:36 kenj Exp $
  1760. X# run MUSBUS multiuser test continuously
  1761. Xlog=Tmp/log.groan
  1762. Xnogroan=Tmp/nogroan
  1763. Xnospeed=Tmp/nospeed
  1764. Xnusers=${nusers-"8 16"}
  1765. Xttys=${ttys-"/dev/ttyi05 /dev/ttyi17 /dev/ttyi36 /dev/ttyi53"}
  1766. Xdirs=${dirs-"`echo /*/musbus`"}
  1767. Xiterations=${iterations-4}
  1768. Xrate=${rate-4}
  1769. Xexport nusers ttys dirs iterations rate workdir
  1770. X
  1771. Xrm -f $nogroan
  1772. Xn=1
  1773. X
  1774. Xfor t in $ttys
  1775. Xdo
  1776. X    stty 9600 -tabs -raw -nl >$t &
  1777. Xdone
  1778. Xfor d in $dirs
  1779. Xdo
  1780. X    if test -d $d
  1781. X    then
  1782. X        :
  1783. X    else
  1784. X        mkdir $d
  1785. X        echo $d created.
  1786. X    fi
  1787. Xdone
  1788. X
  1789. Xdate > $log
  1790. X
  1791. Xwhile test ! -f $nogroan
  1792. Xdo
  1793. X    for workdir in Work_stress Work_text Workload
  1794. X    do
  1795. X    echo $workdir: >>$log
  1796. X    if test $n -eq 1 -a ! -f $nospeed
  1797. X    then
  1798. X        ./run >> $log 2>&1
  1799. X    else
  1800. X        ./run work >> $log 2>&1
  1801. X    fi
  1802. X    done
  1803. X    echo "Groan: Major Iteration $n Completed" >>$log
  1804. X    n=`expr $n + 1`
  1805. Xdone
  1806. X
  1807. Xexit 0
  1808. End-of-File-Grunt
  1809. if test 857 -ne `cat 'update.018' | wc -c`
  1810. then
  1811.     echo 'shar: transmission error (expected 857 characters)'
  1812. fi
  1813. echo 'x - update.019'
  1814. if test -f 'update.019'
  1815. then
  1816.     echo 'shar: over-writing existing file update.019'
  1817. fi
  1818. sed 's/^X//' > update.019 <<'End-of-File-Grunt'
  1819. X#! /bin/sh
  1820. X# Plot progress of the multi-user workload.
  1821. X# $Header: progress,v 5.2 87/12/09 15:36:43 kenj Exp $
  1822. Xif test ! -r Tmp/script.1
  1823. Xthen
  1824. X    echo "progress: cannot read \"Tmp/script.1\""
  1825. X    exit 1
  1826. Xfi
  1827. X
  1828. Xif test `echo Tmp/userlog.* | sed 's/ .*//'` = "Tmp/userlog.*"
  1829. Xthen
  1830. X    echo "progress: no active log files"
  1831. X    exit 1
  1832. Xfi
  1833. X
  1834. Xecho 'MUSBUS Multi-user Test: -- Progress Report --
  1835. XOne * per simulated user, representing the number of commands completed;
  1836. Xexcept the right most * which is the total number of commands per script.'
  1837. X
  1838. XPS1=`/bin/sh -ic "" 2>&1`
  1839. X( ( cat Tmp/script.1 | wc -l ) \
  1840. X; for i in Tmp/userlog.*
  1841. Xdo
  1842. X    if test ! -r "$i"
  1843. X    then
  1844. X    echo "progress: cannot read \"$i\""
  1845. X    exit 1
  1846. X    fi
  1847. X    ( cat $i ; echo "" ) \
  1848. X    | sed 's/ /\
  1849. X/g' \
  1850. X    | sort \
  1851. X    | uniq -c \
  1852. X    | sort -nr -1 \
  1853. X    | sed -e 's/ *\([0-9][0-9]*\) .*/\1/' -e 1q
  1854. Xdone ) \
  1855. X| ./qhisto \
  1856. X| sed \
  1857. X    -e '1,/Question/d
  1858. End-of-File-Grunt
  1859. if test 900 -ne `cat 'update.019' | wc -c`
  1860. then
  1861.     echo 'shar: transmission error (expected 900 characters)'
  1862. fi
  1863. echo 'x - update.020'
  1864. if test -f 'update.020'
  1865. then
  1866.     echo 'shar: over-writing existing file update.020'
  1867. fi
  1868. sed 's/^X//' > update.020 <<'End-of-File-Grunt'
  1869. X1c1,2
  1870. X< # $Header: SysVtime.awk,v 3.4 87/06/22 14:27:23 kjmcdonell Beta $
  1871. X---
  1872. X> # $Header: SysVtime.awk,v 5.2 87/12/09 09:27:11 kenj Exp $
  1873. X> /^cctest.c$/    { next }
  1874. End-of-File-Grunt
  1875. if test 163 -ne `cat 'update.020' | wc -c`
  1876. then
  1877.     echo 'shar: transmission error (expected 163 characters)'
  1878. fi
  1879.